<template>
	<view>
		<view class="head">
		  <view class="store-info">
			  <image :src="imgSrc" class="logo"></image>
			  <text>{{username}}</text>
			  <image src="../../static/set.png" class="set" @tap="set"></image>
		  </view>
		  <view class="message">
			  <image src="../../static/notify.png"></image>
			  <text class="msg">{{message}}</text>
			  <image src="../../static/icon/jiantou.png" class="right"></image>
		  </view>
		  <view class="detail">
			 <view class="item" @click="abnormal(0)">
				 <text class="num">{{num1}}</text>
				 <text class="des">新订单</text>
			 </view>
			 <view class="item" @click="abnormal(1)">
				 <text class="num">{{num2}}</text>
				 <text class="des">退单</text>
			 </view>
			  <view class="item" @click="abnormal(2)">
				  <text class="num">{{num3}}</text>
				  <text class="des">超时未发货</text>
			  </view>
			  <view class="item" @click="abnormal(3)">
				  <text class="num">{{num4}}</text>
				  <text class="des">骑手异常</text>
			  </view>
			  <view class="item" @click="abnormal(4)">
				  <text class="num">{{num5}}</text>
				  <text class="des">库存不足</text>
			  </view>
		  </view>
		</view>
		 <view class="content">
			<view class="items" @tap="print">
				<image src="../../static/icon/icon1.png" class="left"></image>
				<text>打印设置</text>
				<image src="../../static/icon/jiantou.png" class="right"></image>
			</view>
			<view class="items" @tap="updatepwd">
				<image src="../../static/icon/icon2.png" class="left"></image>
				<text>修改密码</text>
				<image src="../../static/icon/jiantou.png" class="right"></image>
			</view>
			<view class="items">
				<image src="../../static/icon/icon3.png" class="left"></image>
				<text>绑定手机</text>
				<image src="../../static/icon/jiantou.png" class="right"></image>
			</view>
			<view class="items" @click="skip">
				<image src="../../static/icon/icon4.png" class="left"></image>
				<text>门店端</text>
				<image src="../../static/icon/jiantou.png" class="right"></image>
			</view>
			<view class="items" @tap="tixian">
				<image src="../../static/icon/icon5.png" class="left"></image>
				<text>提现</text>
				<image src="../../static/icon/jiantou.png" class="right"></image>
			</view>
			<!-- <view class="items" @tap="tixian">
				<image src="../../static/icon/icon5.png" class="left"></image>
				<text>提现</text>
				<uni-icons type="arrowright" size="25"></uni-icons>
			</view> -->
		</view>
	</view>
</template>
<script>
export default {
	data(){
		return {
			//头像
			imgSrc:require("../../static/logo.png"),
			username:'张三三',
			message:'你有一个订单超时未处理，快去处理',
			num1:12,
			num2:0,
			num3:6,
			num4:2,
			num5:13
		}
	},
	onLoad(){
		uni.request({
			
		})
	},
	methods: {
		skip(){
			 wx.navigateToMiniProgram({
			      appId: 'wxb1ea3da04e1d0443',  // 需要跳转到指定的小程序appid
			      path: 'pages/index/index',      // 打开的页面
			      envVersion: 'develop',
			      success(res) {
			        // 打开成功
			        console.log(res);
			      }
			    })
			
		},
		print(){
			uni.navigateTo({
				url:"../print/print"
			})
		},
		updatepwd(){
			uni.navigateTo({
				url:"../updatepwd/updatepwd"
			})
		},
		tixian(){
			uni.navigateTo({
				url:"../tixian/tixian"
			})
		},
		set(){
			uni.navigateTo({
				url:"../setting/setting"
			})
		},
		abnormal(index){
			console.log(index);
			var i = JSON.stringify(index);
			console.log(i);
			uni.setStorage({
				key: 'i',
				data: i,
				success: function() {
					// console.log(i);
				}
			});
			uni.navigateTo({
				url:"/pages/otherOrder/otherOrder"
			})
		}
	}
}
</script>

<style lang="scss">
page {
	font-family: Alibaba PuHuiTi;
	font-weight: 400;
}
.head {
	width: 750rpx;
	height: 460rpx;
	background: linear-gradient(145deg, #FDB849 0%, #FEA834 100%);
	display: flex;
	flex-direction: column;
	position: relative;
}
.store-info {
	display: flex;
	flex-direction: row;
	align-items: center;
	margin-left: 30rpx;
	margin-top: 108rpx;
    .logo {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50%;
	}
	text {
		font-size: 34rpx;
		color: #1A1A1A;
		line-height: 60rpx;
		margin-left: 30rpx;
	}
	.set {
		width: 40rpx;
		height: 36rpx;
		margin-left: 424rpx;
	}
}
.message {
	width: 690rpx;
	height: 60rpx;
	margin-left: 30rpx;
	margin-top: 30rpx;
    background: rgba(255, 255, 255, 0.2);
	border-radius: 10rpx;
	display: flex;
	flex-direction: row;
	align-items: center;
	image {
		width: 28rpx;
		height: 24rpx;
		padding-left: 20rpx;
	}
	text {
		font-size: 24rpx;
		line-height: 60rpx;
		padding-left: 20rpx;
	}
	.right {
		width: 12rpx;
		height: 20rpx;
		margin-left: auto;
		margin-right: 20rpx;
	}
}
.detail {
	display: flex;
	flex-direction: row;
	margin: 20rpx 30rpx;
	justify-content: space-between;
	font-family: Alibaba PuHuiTi;
	color: #1A1A1A;
	line-height: 60rpx;
}
.item {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.num {
	font-size: 40rpx;
	font-weight: 500;
}
.des {
	font-size: 24rpx;
	font-weight: 400;
}
.content {
	width: 750rpx;
	height: 1000rpx;
	background: #F5F5F5;
	border-radius: 20rpx 20rpx 0rpx 0rpx;
	position: absolute;
    top: 440rpx;
	display: flex;
	flex-direction: column;
}
.items {
	display: flex;
	flex-direction: row;
	margin-left: 30rpx;
	margin-top: 60rpx;
	line-height: 30rpx;
	.left {
		width: 26rpx;
		height: 26rpx;
	}
	text {
		font-size: 28rpx;
		color: #1A1A1A;
		margin-left: 20rpx;
	}
	.right {
		width: 12rpx;
		height: 20rpx;
		margin-right: 30rpx;
		margin-left: auto;
		margin-top: 10rpx;
	}
}
</style>
